Public Module WorkRemanning

    Private Const _showMessage As Boolean = True
    Private Const _maxMessagesToShow As Integer = 10

    Private _messageShownCount As Integer = 0

    Public SkipedBlockCount As Integer = 0
    Public SkipedLineCount As Integer = 0
    Public ReadedLineCount As Integer = 0
    Public UnmanagedLineCount As Integer = 0

    Private Function IsMaxMessageToShowReached() As Boolean

        Dim result As Boolean

        If _messageShownCount >= _maxMessagesToShow Then
            result = True
        Else
            result = False
        End If

        Return result

    End Function

    Public Sub AddUnmanagedLine(text As String)
        AddUnmanagedLine()
        If _showMessage AndAlso Not IsMaxMessageToShowReached() Then
            Debug.Print("line {0} not managed : '{1}'", ReadedLineCount, text)
            _messageShownCount += 1
        End If
    End Sub

    Public Sub AddSkipedLine(text As String)
        AddSkipedLine()
        If _showMessage AndAlso Not IsMaxMessageToShowReached() Then
            Debug.Print("line {0} not processed : '{1}'", ReadedLineCount, text)
            _messageShownCount += 1
        End If
    End Sub

    Public Sub StartSkipBlock(text As String)
        AddSkipedBlock()
        If _showMessage AndAlso Not IsMaxMessageToShowReached() Then
            Debug.Print("Line {0} Block '{1}' not processed", ReadedLineCount, text)
            _messageShownCount += 1
        End If
    End Sub

    Public Sub EndSkipBlock()
        If _showMessage AndAlso Not IsMaxMessageToShowReached() Then
            Debug.Print("Line {0} end of Block", ReadedLineCount)
            _messageShownCount += 1
        End If
    End Sub

    Public Sub AddReadedLine()
        ReadedLineCount += 1
    End Sub

    Public Sub AddSkipedLine()
        SkipedLineCount += 1
    End Sub

    Public Sub AddUnmanagedLine()
        UnmanagedLineCount += 1
    End Sub

    Public Sub AddSkipedBlock()
        SkipedBlockCount += 1
    End Sub

End Module